#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int f(int x){
int y=1,i = 1;
for ( i = 1; i <= x; i++)
{	 y *= i;
}
return y;
}
int main(){
	int x,y=1,z=1;	
	scanf("%d", &x);
	for (int c=0,y=1;y<=x;y++) {
		for (int tmp = 1; tmp <= y; tmp++) {
			z *= tmp;
		}
		c += z;
	}
	printf("%d", z);
	return 0;
}